import { Entity, Column, OneToOne } from 'typeorm'
import { Staff } from 'src/modules/staff/entities/staff.entity'
import { App } from 'src/app.entity'
@Entity()
export class Department extends App {
  @Column({ type: 'varchar', length: 10 })
  name: string
  @Column({ type: 'varchar', length: 50, nullable: true })
  desc?: string
  @OneToOne(() => Staff, staff => staff.department)
  staff: Staff
}
